part of 'fragment.dart';

class _PurchaseManagementFragmentWlocStateFactory {
  const _PurchaseManagementFragmentWlocStateFactory._internal();

  static const _instance = _PurchaseManagementFragmentWlocStateFactory._internal();

  factory _PurchaseManagementFragmentWlocStateFactory() {
    return _instance;
  }

  _PurchaseManagementFragmentWlocState create({
    required PurchaseManagementFragmentBlocState blocState,
  }) {
    if (blocState is InitialPurchaseManagementFragmentBlocState) {
      return const _InitialPurchaseManagementFragmentWlocState();
    }

    if (blocState is LoadingPurchaseManagementFragmentBlocState) {
      return const _LoadingPurchaseManagementFragmentWlocState();
    }

    if (blocState is LoadedPurchaseManagementFragmentBlocState) {
      return _LoadedPurchaseManagementFragmentWlocState(
        activePurchasedItemModels: blocState.activePurchasedItemModels,
        pausedGooglePlayPurchasedSubscriptionModels:
            blocState.pausedGooglePlayPurchasedSubscriptionModels,
        expiredPurchasedSubscriptionModels: blocState.expiredPurchasedSubscriptionModels,
      );
    }

    throw UnimplementedError();
  }
}
